<div id="footer_outer">
<div id="footer" <?php echo (isset($frontoffice) && $frontoffice == 1) ? 'class="footer_frontoffice"' : '' ?>>

  <div class="fleft"><?php echo __("Powered by %corporate%", array(
          '%corporate%' => link_to(__('VTNS'), 'http://www.vtns.vn', array('target' => '_blank')),
          )) ?>
  </div>

  <div class="fright">
<?php
$links = array(
    '%about%'   => link_to(__('About'),
                           'http://www.facebook.com/apps/application.php?id='.sfConfig::get('sf_facebook_app_id').'&v=info',
                           array('target' => '_blank')),
    '%privacy%' => link_to(__('Privacy Policy'),
                           sfConfig::get('sf_vtns_privacy_url'),
                           array('target' => '_blank')),
    '%public%'  => (!empty($public_page) && $sf_user->getPage() ? link_to(__('Public page'), $sf_user->getPage()->getCurrentTabUrl(), array('target' => '_top')) : ''),
    '%admin%'   => (!empty($admin) && $sf_user->getPage() ? link_to(__('Admin'), fb_url_for('@backoffice_list', true), array('target' => '_top')) : ''),
    '%contact%' => link_to_function(__('Contact Us'), 'contactUs(this)'),
    );

if (empty($public_page) || !$sf_user->getPage())
    unset($links['%public%']);
if (empty($admin) || !$sf_user->getPage() || !$sf_user->hasCredential('page_admin'))
    unset($links['%admin%']);

echo implode(' - ', $links);
?>
  </div>
</div><!-- #footer -->
</div><!-- #footer_outer -->

<?php include_partial('default/html_contact_form') ?>
<?php if (!isset($google_analytics) || $google_analytics): ?>
<script type="text/javascript">
(function () {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; 
    ga.src = ('https:' == document.location.protocol ? 'https://ssl'   : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
    <?php if ($sf_request->getParameter('action') !== 'step0'): ?>
      <?php echo google_analytics_tag() ?>
    <?php endif ?>
<?php endif ?>
